<template>
  <div id='leveldetail'>
    <img class="viptop" src="../assets/images/viplevel-top.png" alt="">
    <div class="mendianshowinfo" v-for="(item, lindex) in levelinfo" :key="lindex">
      <div class="infolevel">
        <img :src="item.levelimg" alt="">
        <div class="mendianinfocontent">
          <h1>{{item.levelname}}</h1>
          <p v-html="item.upleveltext"></p>
        </div>
      </div>
      <div class="hiddenbar" :class="item.istagg === true ? 'showbar' : ''">
        <hr>
        <div class="mendiantitle">—— 会员福利 ——</div>
        <div class="mendian" v-for="iitem in item.preferential">
          <img :src="iitem.iconimg" alt="">
          <div class="mandianright">
            <p v-for="ili in iitem.preferentialtext">{{ili}}</p>
          </div>
        </div>
        <div class="afterbar" :class="item.istagg === true ? 'trambar' : ''" @click="tigg(lindex)"></div>
      </div>
    </div>
    <div class="mendianshowinfo">
      <div class="mendiantitle">—— 积分获取 ——</div>
      <section class="tiptop">消费积分：每消费1元累计1分</section>
      <section>奖励积分：在“李宁体育”公众号和“李宁官网”上完成制定的任务可获得额度不等的奖励积分</section>
    </div>
  </div>
</template>

<script>

export default {
  name: 'leveldetail',
  components: {
  },
  data () {
    return {
      levelinfo: {}
    }
  },
  created () {
    this.getObjDetail('./static/json/level/vippreferential.json').then((data) => {
      data.levelthemes.forEach((item) => {
        item.istagg = false
      })
      this.levelinfo = data.levelthemes
    }, () => {})
  },
  methods: {
    tigg (i) {
      this.levelinfo[i].istagg = !this.levelinfo[i].istagg
    }
  }
}
</script>

<style lang="less">
@import '../assets/less/userlevel/levelinfo.less';
</style>
